import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.*;

public class Day03 {
    public static void main1(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] arr = in.nextLine().split(" ");
        for (int i = 0; i < arr.length; i++) {
            char p = arr[i].charAt(0);
            if (p >= 'a') p = (char) (p - 'a' + 'A');
            System.out.print(p);
        }
        System.out.println();
    }


    // 方法1 内存超限
//    public static void main(String[] args) {
//        Scanner in = new Scanner(System.in);
//        int len = in.nextInt(), x = in.nextInt();
//        in.nextLine();
//        short[] arr = toShortArr(in);
//
//        int[] span = getMinSpan(arr, x);
//        System.out.println(span[0] + " " + span[1]);
//    }
//
//    private static int[] getMinSpan(short[] arr, int x) {
//        int curVal = 0, left = 0, right = 0, pL = 0, pR = Integer.MAX_VALUE;
//        for (int i = 0; i < arr.length; i++) {
//            curVal += arr[i];
//            right++;
//            if (curVal >= x) {
//                // 先删除前面的看一下能不能减少长度
//                while (curVal >= x) {
//                    curVal -= arr[left];
//                    left++;
//                }
//                // 判断
//                if (pR - pL > right - left) {
//                    pR = right;
//                    pL = left;
//                }
//            }
//        }
//        return new int[]{pL, pR};
//    }
//
//    private static short[] toShortArr(Scanner in) {
//        String[] arr = in.nextLine().split(" ");
//        short[] result = new short[arr.length];
//        for (int i = 0; i < result.length; i++) {
//            result[i] = Short.parseShort(arr[i]);
//        }
//        return result;
//    }

    // scanner 读取时间长度过长 所以使用StreamTokenizer
    public static void main2(String[] args) throws IOException {
        StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        st.nextToken();
        int len = (int) st.nval;
        st.nextToken();
        int x = (int) st.nval;


        int[] span = getMinSpan(x, len, st);
        System.out.println(span[0] + " " + span[1]);
    }

    private static int[] getMinSpan(int x, int len, StreamTokenizer st) throws IOException {
        int curVal = 0, left = 0, right = 0, pL = 0, pR = Integer.MAX_VALUE;
        List<Integer> curList = new LinkedList<>();

        for (int i = 0; i < len; i++) {
            st.nextToken();
            int tmp = (int) st.nval;
            curList.add(tmp);
            curVal += tmp;
            right++;

            if (curVal >= x) {
                // 先删除前面的看一下能不能减少长度
                while (curVal >= x) {
                    Integer remove = curList.remove(0);
                    curVal -= remove;
                    left++;
                }
                // 判断
                if (pR - pL > right - left) {
                    pR = right;
                    pL = left;
                }
            }
        }
        return new int[]{pL, pR};
    }

    public static void main(String[] args) throws IOException {
        StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        int n = readInt(st), k = readInt(st);
        PriorityQueue<Integer> queue = new PriorityQueue<>(((o1, o2) -> o2 - o1));


        Long result = 0L;
        for (int i = 0; i < n; i++) {
            int num = readInt(st);
            result = add(queue, num, result);
        }
        for (int i = 0; i < k; i++) {
            if (queue.size() == 0) {
                break;
            }
            result = add(queue, queue.poll() / 2, result);
        }
        for (Integer num : queue) {
            result += num;
        }

        System.out.println(result);
    }

    private static Long add(PriorityQueue<Integer> queue, int num, Long result) {
        if ((num & 1) == 1) {
            result += num;
        } else {
            // 偶数
            queue.add(num);
        }
        return result;
    }

    private static int readInt(StreamTokenizer st) throws IOException {
        st.nextToken();
        return (int) st.nval;
    }
}
